package com.zx.callback.dao;

import com.zx.callback.po.OrderInfo;
import com.zx.callback.vo.order.OrderAndUserInfoVO;
import com.zx.callback.vo.order.OrderListParamVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
@Repository
public interface OrderInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(OrderInfo record);

    int insertSelective(OrderInfo record);

    OrderInfo selectByPrimaryKey(Long id);

    /**
     * 根据订单编号获取订单信息
     * @param orderNum
     * @return
     */
    OrderInfo selectByOrderNum(@Param("orderNum") String orderNum);

    int updateByPrimaryKeySelective(OrderInfo record);

    /**
     * 更改订单状态
     * @param orderId
     * @return
     */
    int updateOrderStatePaySucessById(@Param("orderId") Long orderId,@Param("couponMoney") BigDecimal couponMoney);

    int updateByPrimaryKey(OrderInfo record);
}